<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
          var arr = [
            {name:"肯德基",price:100,distance:100,num:2},
            {name:"必胜客",price:200,distance:500,num:1},
            {name:"华莱士",price:50,distance:1000,num:5}
        ]
        var sum =0;
        for(var i=0;i<arr.length;i++){           
            sum+=arr[i].price*arr[i].num;
        }
        console.log(sum)
    </script>
</body>
</html>